#!/usr/bin/python
# -*- coding: UTF-8 -*-

#~ The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
#~ 
#~ Find the sum of all the primes below two million.


from mathlib import *

result = 0
k=0

while ( k < 2000000 ):
  if ( isprime(k) ):
    result+=k
    #~ print "+="+str(k)
    #~ print "="+str(result)
  k+=1

print result
